+2004-03-05 Alexander Larsson <alexl@redhat.com>
+
+ * gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
+ Document the fact that there might not be a volume for all
+ paths.
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
+ Don't assume there is a volume for all paths.
+
Fri Mar 5 01:45:04 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
+2004-03-05 Alexander Larsson <alexl@redhat.com>
+
+ * gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
+ Document the fact that there might not be a volume for all
+ paths.
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
+ Don't assume there is a volume for all paths.
+
Fri Mar 5 01:45:04 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
+2004-03-05 Alexander Larsson <alexl@redhat.com>
+
+ * gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
+ Document the fact that there might not be a volume for all
+ paths.
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
+ Don't assume there is a volume for all paths.
+
Fri Mar 5 01:45:04 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
+2004-03-05 Alexander Larsson <alexl@redhat.com>
+
+ * gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
+ Document the fact that there might not be a volume for all
+ paths.
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
+ Don't assume there is a volume for all paths.
+
Fri Mar 5 01:45:04 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
+2004-03-05 Alexander Larsson <alexl@redhat.com>
+
+ * gtk/gtkfilesystem.c (gtk_file_system_get_volume_for_path):
+ Document the fact that there might not be a volume for all
+ paths.
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder):
+ Don't assume there is a volume for all paths.
+
Fri Mar 5 01:45:04 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in
pos = shortcuts_get_index (impl, SHORTCUTS_CURRENT_FOLDER);
volume = gtk_file_system_get_volume_for_path (impl->file_system, impl->current_folder);
- base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
-
- if (strcmp (gtk_file_path_get_string (base_path), gtk_file_path_get_string (impl->current_folder)) == 0)
+ if (volume)
+ base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
+ else
+ base_path = NULL;
+
+ if (base_path &&
+ strcmp (gtk_file_path_get_string (base_path), gtk_file_path_get_string (impl->current_folder)) == 0)
{
success = shortcuts_insert_path (impl, pos, TRUE, volume, NULL, NULL, FALSE, NULL);
impl->shortcuts_current_folder_is_volume = TRUE;
}
else
{
- gtk_file_system_volume_free (impl->file_system, volume);
success = shortcuts_insert_path (impl, pos, FALSE, NULL, impl->current_folder, NULL, FALSE, NULL);
impl->shortcuts_current_folder_is_volume = FALSE;
}
+ if (volume)
+ gtk_file_system_volume_free (impl->file_system, volume);
gtk_file_path_free (base_path);
if (!success)
* @path: a #GtkFilePath
*
* Queries the file system volume that corresponds to a specific path.
+ * There might not be a volume for all paths (consinder for instance remote
+ * shared), so this can return NULL.
*
* Return value: the #GtkFileSystemVolume that corresponds to the specified
- * @path. You should free this value with gtk_file_system_volume_free().
+ * @path, or NULL if there is no such volume. You should free this value with
+ * gtk_file_system_volume_free().
**/
GtkFileSystemVolume *
gtk_file_system_get_volume_for_path (GtkFileSystem *file_system,